import com.zh.service.Imp.demoServiceImp;
import com.zh.service.demoService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    private static demoService demoService = new demoServiceImp();
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        demoService service = (demoService) applicationContext.getBean("demoService");
        demoService service1 = applicationContext.getBean("demoService", demoService.class);
        demoService service2 = applicationContext.getBean(demoService.class);
        service.add();
        service1.add();
        service2.add();
    }
}
